interface IObj {
    id:number,
    name:string
}
function getValue(obj:IObj,key:string){
    //断言,指定获取当前某个值
    return obj[key as keyof IObj]
}

